home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-05 / lstn1-5.zip / LS-5.TXT < prev   
Text File  |  1991-10-03  |  12KB  |  395 lines

  1. Hayes(r) Microcomputer Products, Inc.    LANstep(r) Technical Note
  2.  
  3.                                        "Memory Management on a DOS
  4.                                       Workstation Using MS-DOS 5.0"
  5.  
  6. Number LS-5                                         September 1991
  7.  
  8. Summary:
  9.  
  10. This Technical Note outlines different ways of getting the best use 
  11. out of memory on a LANstep DOS Workstation that is using MS-DOS 5.0. 
  12.  
  13. MS-DOS 5.0 offers a number of methods of using extended, high and 
  14. upper memory that can all result in larger amounts of conventional 
  15. memory being made available for larger applications.
  16.  
  17. While exact amounts vary with the hardware available and methods 
  18. used, you'll learn how to maximize the amount of conventional memory 
  19. available on even the most basic configurations.
  20.  
  21.  
  22. What This Note is About
  23.  
  24. If you've upgraded a 80286, 80386 or 80486 based DOS Workstation 
  25. with DOS 5.0, you can take advantage of some DOS 5.0-only techniques 
  26. and software to make more conventional memory available for 
  27. application usage.
  28.  
  29. It's important to keep in mind that not all memory management 
  30. options described in this document will necessarily work with all 
  31. PCs. However, a large number of PCs can use these methods to obtain 
  32. more usable memory.
  33.  
  34.  
  35. About Memory
  36.  
  37. It's rumored that only a select few people in the world know the 
  38. formula for Coca-Cola and even fewer still understand the different 
  39. types of memory used in a modern PC. Read this section and you'll 
  40. learn too.
  41.  
  42. Conventional DOS (Application) Memory
  43.  
  44. Conventional memory is the first 640K of memory found in a PC. This 
  45. is the memory used by nearly all applications (word processors, 
  46. spreadsheets, etc.) programs, including DOS, TSR's, device drivers, 
  47. etc.
  48.  
  49. Upper Memory Area
  50.  
  51. The Upper memory area is the 384K found between 640K and 1MB. This 
  52. memory is normally reserved for system use, such as video cards and 
  53. other hardware, but it is possible to use some upper memory blocks of 
  54. the upper memory area when you have an 80386 or 80486 based PC with 
  55. extended memory.
  56.  
  57. Upper Memory Blocks
  58.  
  59. These are parts of the upper memory area that aren't used by the 
  60. system. You can typically use some of this memory if you have an 
  61. 80386 or 80486 with extended memory.
  62.  
  63. Extended Memory
  64.  
  65. This type of memory is only available on 80286, 80386 or 80486 based 
  66. PCs. Extended memory begins at the 1MB address. 
  67.  
  68. High Memory Area (HMA)
  69.  
  70. The first 64K of extended memory is called the high memory area and 
  71. is where DOS 5.0 may be loaded, if the CONFIG.SYS file includes these 
  72. two lines:
  73.  
  74.     DEVICE=HIMEM.SYS
  75.     DOS=HIGH
  76.  
  77. HIMEM.SYS is a device driver provided with DOS 5.0 that may be put 
  78. anywhere on the disk, provided the DEVICE statement properly points 
  79. to that location.
  80.  
  81.  
  82. About Memory Managers
  83.  
  84. Memory managers refer to software that can utilize areas of memory 
  85. not normally available for application programs. DOS 5.0 provides two 
  86. different types of memory managers: HIMEM.SYS and EMM386.EXE.
  87.  
  88. HIMEM.SYS
  89.  
  90. This device driver file insures no two programs use the same areas 
  91. of extended memory. Like other device drivers, HIMEM.SYS is loaded 
  92. via the CONFIG.SYS file. 
  93.  
  94. EMM386.EXE 
  95.  
  96. EMM386.EXE can be used as an upper memory area manager, thus making 
  97. more memory available for application programs. As the name implies, 
  98. EMM386.EXE can only be used with 80386 / 80486 based PCs, and such 
  99. systems must be using DOS 5.0.
  100.  
  101.  
  102. Some Sample Configurations
  103.  
  104. The remainder of this note outlines some possible configurations for 
  105. different types of PCs and how the memory manager software provided 
  106. with DOS 5.0 can make more memory available for use by application 
  107. programs. Each of these examples shows:
  108.  
  109. * A sample CONFIG.SYS
  110. * A sample AUTOEXEC.BAT
  111. * Memory usage listing
  112.  
  113.  
  114. 80286 With No Extended Memory
  115.  
  116. On 80286 PCs with no extended memory, the default DOS Workstation 
  117. memory configuration is shown here. Notice the CONFIG.SYS and 
  118. AUTOEXEC.BAT are loading all necessary commands and drivers for DOS 
  119. and LANstep, while the NETROOM batch file loads Office, Mail, and All 
  120. Points Bulletins.
  121.  
  122. Sample CONFIG.SYS:
  123.  
  124.     FILES=25
  125.     BUFFERS=3
  126.     LASTDRIVE=J
  127.     DEVICE=PROTMAN.SYS
  128.     DEVICE=NDISDRVR.SYS
  129.  
  130. Sample AUTOEXEC.BAT:
  131.  
  132.     ECHO OFF
  133.     NETRDR
  134.     SET WMCMDS=E:
  135.     SET PATH=%WMCMDS%\;%PATH%;A:\;
  136.     SET TMP=%WMCMDS%\TMP\NW000
  137.     NETROOM
  138.  
  139. Conventional Memory Usage:
  140.  
  141. Name        Size  (decimal)   Size (hex)
  142.  
  143. MSDOS       52240   (51.0K)   CC10
  144. PROTMAN      2176    (2.1K)    880
  145. NDISDRVR    14192   (13.9K)   3770
  146. COMMAND      4768    (4.7K)   12A0
  147. NETRDR      94224   (92.0K)  17010
  148. OFFICE       2544    (2.5K)    9F0
  149. MAILNOTF     2720    (2.7K)    AA0
  150. APB_TSR      9488    (9.3K)   2510
  151. COMMAND      2800    (2.7K)    AF0
  152.  
  153. Free Memory Sizes:
  154.  
  155. Total FREE:                             469808  (458.8K) 
  156. Total bytes available to programs:      469808  (458.8K)
  157. Largest executable program size:        469808  (458.6K)
  158.  
  159.  
  160.  
  161.  
  162. 80286 With Extended Memory
  163.  
  164. 80286 PCs with extended memory used as a DOS Workstation benefit 
  165. from extended memory when configured as shown here. Notice the 
  166. CONFIG.SYS file has been modified to load HIMEM.SYS and set DOS=HIGH, 
  167. which puts DOS in the High Memory Area. The AUTOEXEC.BAT and 
  168. CONFIG.SYS are still loading all necessary commands and drivers for 
  169. DOS and LANstep, while Office, Mail, and All Points Bulletin's are 
  170. loaded by NETROOM. Best of all, the amount of available conventional 
  171. memory has increased.
  172.  
  173. Sample CONFIG.SYS:
  174.  
  175.     DEVICE=HIMEM.SYS
  176.     BUFFERS=3
  177.     LASTDRIVE=J
  178.     DEVICE=PROTMAN.SYS
  179.     DEVICE=NDISDRVR.SYS
  180.     DOS=HIGH
  181.  
  182. Sample AUTOEXEC.BAT:
  183.  
  184.     ECHO OFF
  185.     NETRDR
  186.     SET WMCMDS=E:
  187.     SET PATH=%WMCMDS%\;%PATH%;A:\;
  188.     SET TMP=%WMCMDS%\TMP\NW000
  189.     NETROOM
  190.  
  191. Conventional Memory Usage:
  192.  
  193. Name        Size  (decimal)   Size (hex)
  194.  
  195. MSDOS       11728   (11.5K)  2DD0
  196. HIMEM        1184    (1.2K)   4A0
  197. PROTMAN      2144    (2.1K)   860
  198. NDISDRVR    14192   (13.9K)  3770
  199. COMMAND      2688    (2.6K)   A80
  200. NETRDR      94224   (92.0K) 17010
  201. OFFICE       2544    (2.5K)   9F0
  202. MAILNOTF     2720    (2.7K)   AA0
  203. APB_TSR      9488    (9.3K)  2510
  204. COMMAND      2800    (2.7K)   AF0
  205.  
  206.  
  207. Free Memory Sizes:
  208.  
  209. Total FREE:                             509392  (497.5K) 
  210. Total bytes available to programs:      509392  (499.5K)
  211. Largest executable program size:        509392  (499.2K)
  212.  
  213.  
  214.  
  215. 80386 With No Extended Memory
  216.  
  217. On 80386 based PCs without extended memory, the default DOS 
  218. Workstation memory configuration doesn't do quite as well as a 80286 
  219. based machine with extended memory. Note that CONFIG.SYS and 
  220. AUTOEXEC.BAT are loading all necessary commands and drivers for DOS 
  221. and LANstep, while NETROOM is loading Office, Mail, and All Points 
  222. Bulletin's.
  223.  
  224. Sample CONFIG.SYS:
  225.  
  226.     FILES=25
  227.     BUFFERS=3
  228.     LASTDRIVE=J
  229.     DEVICE=PROTMAN.SYS
  230.     DEVICE=NDISDRVR.SYS
  231.  
  232. Sample AUTOEXEC.BAT:
  233.  
  234.  
  235.     ECHO OFF
  236.     NETRDR
  237.     SET WMCMDS=E:
  238.     SET PATH=%WMCMDS%\;%PATH%;A:\;
  239.     SET TMP=%WMCMDS%\TMP\NW000
  240.     NETROOM
  241.  
  242. Name        Size  (decimal)   Size (hex)
  243.  
  244. MSDOS       52112   (50.9K)   CB90
  245. PROTMAN      2176    (2.1K)    880
  246. NDISDRVR    14192   (13.9K)   3770
  247. COMMAND      4768    (4.7K)   12A0
  248. NETRDR      94224   (92.0K)  17010
  249. OFFICE       2544    (2.5K)    9F0
  250. MAILNOTF     2729    (2.7K)    AA0
  251. APB_TSR      9488    (9.3K)   2510
  252. COMMAND      2800    (2.7K)    AF0
  253.  
  254. Free Memory Sizes:
  255.  
  256. Total FREE:                             468944  (458.0K) 
  257. Total bytes available to programs:      468944  (458.0K)
  258. Largest executable program size:        468720  (457.7K)
  259.  
  260. 4456448 bytes total contiguous extended memory
  261. 4456448 bytes available contiguous extended memory
  262.  
  263.  
  264.  
  265. 80386 With Extended Memory and Using HIMEM.SYS
  266.  
  267. Here's an example of an 80386 PC with extended memory that uses 
  268. HIMEM.SYS. Notice the CONFIG.SYS has been modified to load HIMEM.SYS 
  269. and set DOS=HIGH which will put DOS in the High Memory Area. The 
  270. AUTOEXEC.BAT and CONFIG.SYS are still loading all necessary commands 
  271. and drivers for DOS and LANstep and NETROOM loads Office, Mail, and 
  272. All Points Bulletin's. As you might expect, the available 
  273. conventional memory has increased.
  274.  
  275. Sample CONFIG.SYS:
  276.  
  277.     DEVICE=HIMEM.SYS
  278.     FILES=25
  279.     BUFFERS=3
  280.     LASTDRIVE=J
  281.     DEVICE=PROTMAN.SYS
  282.     DEVICE=NDISDRVR.SYS
  283.     DOS=HIGH
  284.  
  285. Sample AUTOEXEC.BAT:
  286.  
  287.     AUTOEXEC.BAT
  288.     ECHO OFF
  289.     NETRDR
  290.     SET WMCMDS=E:
  291.     SET PATH=%WMCMDS%\;%PATH%;A:\;
  292.     SET TMP=%WMCMDS%\TMP\NW000
  293.     NETROOM
  294.  
  295.  
  296. Name        Size  (decimal)   Size (hex)
  297.  
  298. MSDOS      14160   (13.8K)    3750
  299. HIMEM       1136    (1.1K)     470 
  300. PROTMAN     2176    (2.1K)     880
  301. NDISDRVR   14192   (13.9K)    3770
  302. COMMAND     2688    (2.6K)     A80
  303. NETRDR     94224   (92.0K)   17010
  304. OFFICE      2544    (2.5K)     9F0
  305. MAILNOTF    2720    (2.7K)     AA0
  306. APB_TSR     9488    (9.3K)    2510
  307. COMMAND     2800    (2.7K)     AF0
  308.  
  309. Free Memory Sizes:
  310.  
  311. Total FREE:                             507696  (495.9K) 
  312. Total bytes available to programs:      507808  (495.9K)
  313. Largest executable program size:        507584  (495.7K))
  314.  
  315. 4456448 bytes total contiguous extended memory
  316.         0 bytes available contiguous extended memory
  317. 4390912 bytes available XMS memory
  318.         MS-DOS resident in High Memory Area
  319.  
  320.  
  321.  
  322. 80386 With Extended Memory and Using EMM386.EXE
  323.  
  324. Finally, here's an example of what is possible when loading 
  325. EMM386.EXE. Starting EMM386 as shown provides UMB support which 
  326. allows NETRDR to automatically go into UMBs. In this case, we're 
  327. excluding the memory area where the network interface card resides, 
  328. to avoid memory conflicts. Notice the changes to the CONFIG.SYS file 
  329. and the fact that all but 0.3K of the NETRDR goes into extended 
  330. memory.
  331.  
  332. Sample CONFIG.SYS:
  333.  
  334.     DEVICE=HIMEM.SYS
  335.     DEVICE=EMM386.EXE noems x=CC00-CF00
  336.     FILES=25
  337.     BUFFERS=3
  338.     LASTDRIVE=J
  339.     DEVICE=PROTMAN.SYS
  340.     DEVICE=NDISDRVR.SYS
  341.     DOS=HIGH
  342.  
  343. Sample AUTOEXEC.BAT:
  344.  
  345.     ECHO OFF
  346.     NETRDR
  347.     SET WMCMDS=E:
  348.     SET PATH=%WMCMDS%\;%PATH%;A:\;
  349.     SET TMP=%WMCMDS%\TMP\NW000
  350.     NETROOM
  351.         
  352. Name        Size  (decimal)   Size (hex)
  353.  
  354. MSDOS      14160   (13.8K)    3750
  355. HIMEM       1136    (1.1K)     470
  356. PROTMAN     2176    (2.1K)     990
  357. NDISDRVR   14192   (13.9K)    3770
  358. COMMAND     2688    (2.6K)     A80
  359. NETRDR       256     (0.3K)    100
  360. OFFICE      2544    (2.5K)     AA0
  361. MAILNOTF    2720    (2.7K)     AA0
  362. APB_TSR     9488    (9.3K)    2510
  363. COMMAND     2800    (2.7K)     AF0
  364.  
  365. Free Memory Sizes:
  366.  
  367. Total FREE:                             593360  (579.3K) 
  368. Total bytes available to programs:      593360  (579.5K)
  369. Largest executable program size:        593136  (579.2K)
  370.  
  371. 4456448 bytes total contiguous extended memory
  372.         0 bytes available contiguous extended memory
  373. 4189184 bytes available XMS memory
  374.         MS-DOS resident in High Memory Area     
  375.  
  376.  
  377. Conclusion
  378.  
  379. While there are many different ways of manipulating the various 
  380. segments of memory, you'll need to make your own decisions on which 
  381. is best for you. Even if your DOS Workstation is a 80286-based PC 
  382. with no extended memory, DOS 5.0 can help somewhat, since it uses 
  383. less memory than some previous versions. However, as illustrated in 
  384. the previous examples, a 80386 PC with extended memory and the 
  385. EMM386.EXE driver can offer the most.
  386.  
  387. Hayes is a registered trademark and LANstep is a trademark of Hayes
  388. Micrcomputer Products, Inc.
  389.  
  390. Other trademarks appearing in this document are trademarks of the
  391. respective companies
  392.  
  393. (C) 1991 Hayes Microcomputer Products, Inc.
  394.  
  395.